package org.jeecg.modules.zonglzp.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.zonglzp.entity.RepairEntity;
import org.jeecg.modules.zonglzp.mapper.RepairMapper;
import org.jeecg.modules.zonglzp.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class RepairServiceImpl implements RepairService {


    @Autowired
    private RepairMapper mapper;


    /*
    新增返修
     */
    @Override
    public int addrepair(RepairEntity entity) {
        entity.setCreateTime(new Date());
        return mapper.addrepair(entity);
    }

    /*
    查询返修
     */
    @Override
    public IPage<RepairEntity> getrepairlist(Page<RepairEntity> page, String userid, String today, String orderId, int type, int status) {
        return mapper.getrepairlist(page, userid, today, orderId, type, status);
    }

    /*
    根据快递id查询快递名称
     */
    @Override
    public String getcourierNamebyId(int id) {
        return mapper.getcourierNamebyId(id);
    }
}
